import App from './App.vue'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import plugins from './plugins' // plugins
import uploadManagerInstance from './utils/upload'

Vue.use(plugins)
// 注册全局上传管理器
Vue.prototype.$uploadManager = uploadManagerInstance

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import uploadManagerInstance from './utils/upload'

export function createApp() {
  const app = createSSRApp(App)
  app.config.globalProperties.$uploadManager = uploadManagerInstance
  return {
    app
  }
}
// #endif